Jsr299BindingsInterceptor{
  final ClassLoader tccl=SecurityActions.getContextClassLoader();
    SecurityActions.setContextClassLoader(classLoader);
    this.beanManager=beanManager;
    this.ejbName=ejbName;
    EjbDescriptor<Object> descriptor=beanManager.getEjbDescriptor(this.ejbName);
    SessionBean<Object> bean=beanManager.getBean(descriptor);
    final AtomicReference<ManagedReference> reference=(AtomicReference<ManagedReference>)context.getContextData().get(SerializedCdiInterceptorsKey.class);
      creationalContext=beanManager.createCreationalContext(bean);
      interceptorInstances=new HashMap<String,SerializableContextualInstance<Interceptor<Object>,Object>>();
      InterceptorBindings interceptorBindings=getInterceptorBindings(this.ejbName);
        for (        Interceptor<?> interceptor : interceptorBindings.getAllInterceptors()) {
          addInterceptorInstance((Interceptor<Object>)interceptor,beanManager,interceptorInstances);
      WeldInterceptorInstances instances=new WeldInterceptorInstances(creationalContext,interceptorInstances);
      context.getContextData().put(SerializedCdiInterceptorsKey.class,new AtomicReference<ManagedReference>(new ValueManagedReference(new ImmediateValue<Object>(instances))));
      final WeldInterceptorInstances instances=(WeldInterceptorInstances)reference.get().getInstance();
      creationalContext=instances.getCreationalContext();
      interceptorInstances=instances.getInterceptorInstances();
    SecurityActions.setContextClassLoader(tccl);
}
delegateInterception{
  List<Object> currentInterceptorInstances=new ArrayList<Object>();
  for (  Interceptor<?> interceptor : currentInterceptors) {
    currentInterceptorInstances.add(interceptorInstances.get(interceptor.getBeanClass().getName()).getInstance());
  if (currentInterceptorInstances.size() > 0) {
    return new DelegatingInterceptorInvocationContext(invocationContext,currentInterceptors,currentInterceptorInstances,interceptionType).proceed();
 else {
    return invocationContext.proceed();
}
doMethodInterception{
  InterceptorBindings interceptorBindings=getInterceptorBindings(ejbName);
  if (interceptorBindings != null) {
    List<Interceptor<?>> currentInterceptors=interceptorBindings.getMethodInterceptors(interceptionType,invocationContext.getMethod());
    return delegateInterception(invocationContext,interceptionType,currentInterceptors);
}
processInvocation{
switch (interceptionType) {
case AROUND_INVOKE:
    return doMethodInterception(context.getInvocationContext(),InterceptionType.AROUND_INVOKE);
case AROUND_TIMEOUT:
  return doMethodInterception(context.getInvocationContext(),InterceptionType.AROUND_TIMEOUT);
case PRE_DESTROY:
try {
  return doLifecycleInterception(context);
  finally {
  creationalContext.release();
case POST_CONSTRUCT:
return doLifecycleInterception(context);
default :
return context.proceed();
}
doLifecycleInterception{
  try {
    if (interceptorBindings != null) {
      List<Interceptor<?>> currentInterceptors=interceptorBindings.getLifecycleInterceptors(interceptionType);
      delegateInterception(context.getInvocationContext(),interceptionType,currentInterceptors);
  finally {
    return context.proceed();
}
getInterceptorBindings{
  EjbServices ejbServices=beanManager.getServices().get(EjbServices.class);
  if (ejbServices instanceof ForwardingEjbServices) {
    ejbServices=((ForwardingEjbServices)ejbServices).delegate();
  if (ejbServices instanceof WeldEjbServices) {
    interceptorBindings=((WeldEjbServices)ejbServices).getBindings(ejbName);
}
addInterceptorInstance{
  Object instance=beanManager.getContext(interceptor.getScope()).get(interceptor,creationalContext);
  SerializableContextualInstance<Interceptor<Object>,Object> serializableContextualInstance=beanManager.getServices().get(ContextualStore.class).<Interceptor<Object>,Object>getSerializableContextualInstance(interceptor,instance,creationalContext);
  instances.put(interceptor.getBeanClass().getName(),serializableContextualInstance);
}
Factory{ }
create{
  final Jsr299BindingsInterceptor interceptor=new Jsr299BindingsInterceptor((BeanManagerImpl)weldContainer.getValue().getBeanManager(beanArchiveId),ejbName,context,interceptionType,classLoader);
}
getWeldContainer{ }
